from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.utils.translation import gettext_lazy as _

# 自定义Admin站点标题和头部
admin.site.site_header = getattr(settings, 'ADMIN_SITE_HEADER', _('谷香外卖系统管理后台'))
admin.site.site_title = getattr(settings, 'ADMIN_SITE_TITLE', _('谷香外卖系统'))
admin.site.index_title = getattr(settings, 'ADMIN_INDEX_TITLE', _('系统管理'))

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/user/', include('apps.user.urls')),
    path('api/product/', include('apps.product.urls')),
    path('api/order/', include('apps.order.urls')),
    path('api/delivery/', include('apps.delivery.urls')),
    path('api/member/', include('apps.member.urls')),
    path('api/cart/', include('apps.cart.urls')),
    path('api/address/', include('apps.address.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
